package us.wili.dev.client.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import us.wili.dev.client.model.rsp.CompanyRsp;
import us.wili.dev.client.service.ClientCompanyService;
import us.wili.dev.common.model.ResponseDto;
import us.wili.dev.common.util.ResponseUtil;

@Validated
@RestController
@RequestMapping("/api/company")
@Api(tags = "公司")
public class CompanyController {
    @Autowired
    private ClientCompanyService clientCompanyService;

    @ApiOperation(value = "联系我们", nickname = "company")
    @RequestMapping(value = "/company", method = RequestMethod.GET)
    public ResponseDto<CompanyRsp> company(){
        CompanyRsp rsp =clientCompanyService.company();
        return ResponseUtil.getSuccessRsp(rsp);
    }

    @ApiOperation(value = "微信电话地址", nickname = "ContactUs")
    @RequestMapping(value = "/ContactUs", method = RequestMethod.GET)
    public ResponseDto<CompanyRsp> ContactUs(){
        CompanyRsp rsp =clientCompanyService.ContactUs();
        return ResponseUtil.getSuccessRsp(rsp);
    }


}
